var LoadAjax=function(CallBack,OnError)
	{
	this.CallBack=CallBack;
	this.Error=OnError;
	LoadAjax.AddCount(1);
	};
fastCSharp.Copy(LoadAjax,{
Count:0,
Post:function(CallBack,Name,Send,OnError,IsOnLoad,IsRandom)
	{
	var Value=new LoadAjax(CallBack,OnError);
	fastCSharp.Ajax(fastCSharp.ThisFunction(Value,Value.OnLoad),Name,Send,fastCSharp.ThisFunction(Value,Value.OnError),IsOnLoad,IsRandom);
	},
Get:function(CallBack,Name,Send,OnError,IsOnLoad,IsRandom)
	{
	var Value=new LoadAjax(CallBack,OnError);
	fastCSharp.AjaxGet(fastCSharp.ThisFunction(Value,Value.OnLoad),Name,Send,fastCSharp.ThisFunction(Value,Value.OnError),IsOnLoad,IsRandom);
	},
AddCount:function(Value)
	{
	this.ClearInterval();
	if(this.Count+=Value)	this.Interval=setTimeout(this.CreateFunction,100);
	else if(this.Image)	this.Image.Display(0);
	},
ClearInterval:function()
	{
	if(this.Interval)
		{
		clearTimeout(this.Interval);
		this.Interval=0;
		}
	},
Show:function()
	{
	if(this.Count)
		{
		this.Image.ToXY(fastCSharp.$ScrollLeft(),fastCSharp.$ScrollTop()+fastCSharp.$Height()/2).Display(1);
		this.Interval=setTimeout(this.ShowFunction,100);
		}
	},
Create:function()
	{
	this.Interval=0;
	if(!this.Image)	this.Image=fastCSharp.$Create('img').Set('src','//__STATICDOMAIN__/Images/loading.gif').Css('position','absolute').Display(0).To();
	this.Show();
	}
		});
LoadAjax.CreateFunction=fastCSharp.ThisFunction(LoadAjax,LoadAjax.Create);
LoadAjax.ShowFunction=fastCSharp.ThisFunction(LoadAjax,LoadAjax.Show);
LoadAjax.prototype={
OnLoad:function()
	{
	LoadAjax.AddCount(-1);
	if(this.CallBack)	this.CallBack.apply(null,fastCSharp.ToArray(arguments));
	},
OnError:function()
	{
	LoadAjax.AddCount(-1);
	if(this.Error)	this.Error.apply(null,fastCSharp.ToArray(arguments));
	}
		};